package com.active.dao.entity;

import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;

import java.io.Serializable;

/**
 * Created by Administrator on 2019/6/13 0013.
 */
@Slf4j
public class MyBean implements Serializable{

    public void print(){
        log.info("不知道用来干嘛的");
    }
    public String print(String name){
        return name+",added by print(String name)";
    }

    public void invokeTask(DelegateTask task){
        task.setVariable("setByTask","我已经发送了任务:"+task.getVariable("name"));
    }

    public String printBkey(DelegateExecution execution){
        log.info("流程引擎的key：{}",execution.getProcessBusinessKey());

        return execution.getProcessBusinessKey();

    }

}
